<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/IC_Driver/TP_Tango_C32.c 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_27151ef53f10301e424ca52b7f0da996.html">IC_Driver</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">TP_Tango_C32.c</div></div>
</div><!--header-->
<div class="contents">
<a href="_t_p___tango___c32_8c.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="preprocessor">#include &quot;<a class="code" href="_t_p___tango___c32_8h.html">TP_Tango_C32.h</a>&quot;</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="preprocessor">#include &quot;<a class="code" href="version_8h.html">version.h</a>&quot;</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="comment">/*******************************************************************************************************************************************</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span><span class="comment"> * Private Define</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span><span class="comment"> *******************************************************************************************************************************************/</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span><span class="comment">//#define Static_INT_TRIG_ENABLE /**&lt; INT 边沿触发使能(由 dev_touch 模块统一处理) */</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="preprocessor">#include &quot;<a class="code" href="dev__systick_8h.html">dev_systick.h</a>&quot;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a7b01f93f4dfe7b813806eb118d9a330a">   34</a></span><span class="preprocessor">#define Static_Delay_MS(ms)     systick_delay_ms(ms)</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a9a22cb6c038dd83c46f301f480b090ea">   36</a></span><span class="preprocessor">#define Static_GPIO_RST         TP_GPIO_RST</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a0e35163b9b8b2458d8ed860acccf2189">   37</a></span><span class="preprocessor">#define Static_PIN_RST          TP_PIN_RST</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#aa28e2c51103617f389e931e72d7ad437">   39</a></span><span class="preprocessor">#define Static_GPIO_INT         TP_GPIO_INT</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a5bfce6f9bf22ca10ae6da2e31f88977a">   40</a></span><span class="preprocessor">#define Static_PIN_INT          TP_PIN_INT</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a2542829d09bfc1ecd3d0d2eaea0ccc0c">   41</a></span><span class="preprocessor">#define Static_INT_IRQn         TP_INT_IRQn</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a1709a9c3e76518cfac5ae53c91ec08eb">   42</a></span><span class="preprocessor">#define Static_INT_Handler      TP_INT_Handler</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span><span class="preprocessor">#if (SWM34S_LCM_PCBV == SWM34SCE_PIN48_A2)</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#adb889b3b3d07d458ba4c7a8cd55c13cb">   46</a></span><span class="preprocessor">#define Static_GPIO_SCL         TP_GPIO_SCL</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a92bef736ad54d2b209832bfcf0a83bc2">   47</a></span><span class="preprocessor">#define Static_PIN_SCL          TP_PIN_SCL</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span> </div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a427da5fe3942fbe825c6d977a5e1f704">   49</a></span><span class="preprocessor">#define Static_GPIO_SDA         TP_GPIO_SDA</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a583f72e35e6e37f79c81382ba0c1dd12">   50</a></span><span class="preprocessor">#define Static_PIN_SDA          TP_PIN_SDA</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a98f29e975049270f7294d868d575d478">   52</a></span><span class="preprocessor">#define Static_IIC_Init()       do { \</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span><span class="preprocessor">                                GPIO_Init(Static_GPIO_SCL, Static_PIN_SCL, 1, 1, 0, 0); \</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span><span class="preprocessor">                                GPIO_Init(Static_GPIO_SDA, Static_PIN_SDA, 1, 1, 0, 0); \</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span><span class="preprocessor">                                GPIO_AtomicSetBit(Static_GPIO_SCL, Static_PIN_SCL); \</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span><span class="preprocessor">                                GPIO_AtomicSetBit(Static_GPIO_SDA, Static_PIN_SDA); \</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span><span class="preprocessor">                                } while (0)</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span><span class="preprocessor">#include &quot;<a class="code" href="dev__io__i2c_8h.html">dev_io_i2c.h</a>&quot;</span> <span class="comment">/* 软件 IIC 实现 */</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a0188bda80d65682f98cda88c71731c65">   61</a></span><span class="preprocessor">#define Static_IIC_Start(addr)          io_i2c_start(addr, 1)</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a08854588549d953a2496307b86cb7742">   62</a></span><span class="preprocessor">#define Static_IIC_Read(ack)            io_i2c_read(ack, 1)</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a17ac6d09f16373695a2e89f23d89e6b2">   63</a></span><span class="preprocessor">#define Static_IIC_Write(data)          io_i2c_write(data, 1)</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a4980d5242ba8a9b57c3a819410e1b296">   64</a></span><span class="preprocessor">#define Static_IIC_Stop()               io_i2c_stop(1)</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span><span class="preprocessor">#else </span><span class="comment">/* 硬件 IIC */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span><span class="preprocessor">#define Static_PORT_SCL         TP_PORT_SCL</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span><span class="preprocessor">#define Static_PIN_SCL          TP_PIN_SCL</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span><span class="preprocessor">#define Static_PIN_SCL_FUN      TP_PIN_SCL_FUN</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><span class="preprocessor">#define Static_PORT_SDA         TP_PORT_SDA</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span><span class="preprocessor">#define Static_PIN_SDA          TP_PIN_SDA</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span><span class="preprocessor">#define Static_PIN_SDA_FUN      TP_PIN_SDA_FUN</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span> </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span><span class="preprocessor">#define Static_IIC_X            TP_I2C_X</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span><span class="preprocessor">#define Static_IIC_Init()       do { \</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span><span class="preprocessor">                                I2C_InitStructure I2C_initStruct; \</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span><span class="preprocessor">                                PORT_Init(Static_PORT_SCL, Static_PIN_SCL, Static_PIN_SCL_FUN, 1); \</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span><span class="preprocessor">                                Static_PORT_SCL-&gt;PULLU |= (1 &lt;&lt; Static_PIN_SCL); \</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span><span class="preprocessor">                                Static_PORT_SCL-&gt;OPEND |= (1 &lt;&lt; Static_PIN_SCL); \</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span><span class="preprocessor">                                PORT_Init(Static_PORT_SDA, Static_PIN_SDA, Static_PIN_SDA_FUN, 1); \</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span><span class="preprocessor">                                Static_PORT_SDA-&gt;PULLU |= (1 &lt;&lt; Static_PIN_SDA); \</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span><span class="preprocessor">                                Static_PORT_SDA-&gt;OPEND |= (1 &lt;&lt; Static_PIN_SDA); \</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span><span class="preprocessor">                                \</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span><span class="preprocessor">                                I2C_initStruct.Master = 1; \</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span><span class="preprocessor">                                I2C_initStruct.Addr10b = 0; \</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span><span class="preprocessor">                                I2C_initStruct.MstClk = 400000; \</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span><span class="preprocessor">                                I2C_initStruct.TXEmptyIEn = 0; \</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span><span class="preprocessor">                                I2C_initStruct.RXNotEmptyIEn = 0; \</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span><span class="preprocessor">                                I2C_Init(Static_IIC_X, &amp;I2C_initStruct); \</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span><span class="preprocessor">                                I2C_Open(Static_IIC_X); \</span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span><span class="preprocessor">                                } while (0)</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span><span class="preprocessor">#define Static_IIC_Start(addr)          I2C_Start(Static_IIC_X, addr, 1)</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span><span class="preprocessor">#define Static_IIC_Read(ack)            I2C_Read(Static_IIC_X, ack, 1)</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span><span class="preprocessor">#define Static_IIC_Write(data)          I2C_Write(Static_IIC_X, data, 1)</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span><span class="preprocessor">#define Static_IIC_Stop()               I2C_Stop(Static_IIC_X, 1)</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span> </div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a3d52c1b55b374a30d7fa78d704ca6045">  104</a></span><span class="preprocessor">#define TANGO_IIC_ADDR      0xB8 </span><span class="comment">//0x5C</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span> </div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span><span class="comment">/* Tango C32 部分寄存器定义 */</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#af014e1c397c2af62f6638e87ed0c348b">  107</a></span><span class="preprocessor">#define TANGO_RD_ADDR       0x00 </span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#aa89589c2f62c1ca0f16950f9681a4ce1">  108</a></span><span class="preprocessor">#define TANGO_INT_MODE      0x34 </span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a250586168c3efbd2d4b09ba99c9be8d4">  109</a></span><span class="preprocessor">#define TANGO_PID           0x40 </span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span><span class="comment">/*******************************************************************************************************************************************</span></div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span><span class="comment"> * Private Prototype</span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span><span class="comment"> *******************************************************************************************************************************************/</span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="_t_p___tango___c32_8c.html#aefcde442eb24f10e7dc417f09097af2d">iic_delay</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span><span class="keyword">static</span> uint8_t <a class="code hl_function" href="_t_p___tango___c32_8c.html#acee61865928b9e73b78e2704579503c8">tp_read_regs</a>(uint16_t reg, uint8_t *buf, uint8_t len);</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span><span class="comment">//static uint8_t tp_write_regs(uint16_t reg, uint8_t *buf, uint8_t len);</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span> </div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span><span class="comment">/*******************************************************************************************************************************************</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span><span class="comment"> * Public Function</span></div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span><span class="comment"> *******************************************************************************************************************************************/</span></div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a07960df025fbd2b94adb95a629e2f897">  127</a></span>uint8_t <a class="code hl_function" href="_t_p___tango___c32_8c.html#a07960df025fbd2b94adb95a629e2f897">tango_c32_init</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>{</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span>    <a class="code hl_define" href="_t_p___tango___c32_8c.html#a98f29e975049270f7294d868d575d478">Static_IIC_Init</a>();</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span> </div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>    GPIO_Init(<a class="code hl_define" href="_t_p___tango___c32_8c.html#aa28e2c51103617f389e931e72d7ad437">Static_GPIO_INT</a>, <a class="code hl_define" href="_t_p___tango___c32_8c.html#a5bfce6f9bf22ca10ae6da2e31f88977a">Static_PIN_INT</a>, 0, 0, 1, 0); <span class="comment">/* 设置下拉, 选中 IIC 地址 */</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span> </div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span>    GPIO_Init(<a class="code hl_define" href="_t_p___tango___c32_8c.html#a9a22cb6c038dd83c46f301f480b090ea">Static_GPIO_RST</a>, <a class="code hl_define" href="_t_p___tango___c32_8c.html#a0e35163b9b8b2458d8ed860acccf2189">Static_PIN_RST</a>, 1, 1, 0, 0); <span class="comment">/* 复位 */</span></div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span>    GPIO_AtomicClrBit(<a class="code hl_define" href="_t_p___tango___c32_8c.html#a9a22cb6c038dd83c46f301f480b090ea">Static_GPIO_RST</a>, <a class="code hl_define" href="_t_p___tango___c32_8c.html#a0e35163b9b8b2458d8ed860acccf2189">Static_PIN_RST</a>);</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span>    <a class="code hl_define" href="_t_p___tango___c32_8c.html#a7b01f93f4dfe7b813806eb118d9a330a">Static_Delay_MS</a>(10);</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span>    GPIO_AtomicSetBit(<a class="code hl_define" href="_t_p___tango___c32_8c.html#a9a22cb6c038dd83c46f301f480b090ea">Static_GPIO_RST</a>, <a class="code hl_define" href="_t_p___tango___c32_8c.html#a0e35163b9b8b2458d8ed860acccf2189">Static_PIN_RST</a>);</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>    <a class="code hl_define" href="_t_p___tango___c32_8c.html#a7b01f93f4dfe7b813806eb118d9a330a">Static_Delay_MS</a>(10);</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>    GPIO_AtomicClrBit(<a class="code hl_define" href="_t_p___tango___c32_8c.html#a9a22cb6c038dd83c46f301f480b090ea">Static_GPIO_RST</a>, <a class="code hl_define" href="_t_p___tango___c32_8c.html#a0e35163b9b8b2458d8ed860acccf2189">Static_PIN_RST</a>);</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span><span class="preprocessor">#ifdef Static_INT_TRIG_ENABLE</span></div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>    <span class="comment">/* 中断方式选用边沿触发，则需要在 TP_IC 初始化中设置 TP 芯片的扫描方式为中断触发，</span></div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span><span class="comment">     * 如此才能使得长时间按压时不断触发 TP_INT 边沿脉冲信号</span></div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span><span class="comment">     */</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span>    GPIO_Init(<a class="code hl_define" href="_t_p___tango___c32_8c.html#aa28e2c51103617f389e931e72d7ad437">Static_GPIO_INT</a>, <a class="code hl_define" href="_t_p___tango___c32_8c.html#a5bfce6f9bf22ca10ae6da2e31f88977a">Static_PIN_INT</a>, 0, 0, 0, 0);</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span>    EXTI_Init(<a class="code hl_define" href="_t_p___tango___c32_8c.html#aa28e2c51103617f389e931e72d7ad437">Static_GPIO_INT</a>, <a class="code hl_define" href="_t_p___tango___c32_8c.html#a5bfce6f9bf22ca10ae6da2e31f88977a">Static_PIN_INT</a>, EXTI_FALL_EDGE); <span class="comment">/* EXTI_FALL_EDGE - 下降沿触发 / EXTI_RISE_EDGE - 上升沿触发 */</span></div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span>    NVIC_EnableIRQ(<a class="code hl_define" href="_t_p___tango___c32_8c.html#a2542829d09bfc1ecd3d0d2eaea0ccc0c">Static_INT_IRQn</a>);</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>    EXTI_Open(<a class="code hl_define" href="_t_p___tango___c32_8c.html#aa28e2c51103617f389e931e72d7ad437">Static_GPIO_INT</a>, <a class="code hl_define" href="_t_p___tango___c32_8c.html#a5bfce6f9bf22ca10ae6da2e31f88977a">Static_PIN_INT</a>);</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span>    <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span>}</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span> </div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span><span class="preprocessor">#if 0 </span><span class="comment">/* 触摸 INT 外部中断服务子程序统一由 irq_handler 模块处理 */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span><span class="keywordtype">void</span> <a class="code hl_define" href="_t_p___tango___c32_8c.html#a1709a9c3e76518cfac5ae53c91ec08eb">Static_INT_Handler</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span>{</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>    <span class="keywordflow">if</span> (EXTI_State(<a class="code hl_define" href="_t_p___tango___c32_8c.html#aa28e2c51103617f389e931e72d7ad437">Static_GPIO_INT</a>, <a class="code hl_define" href="_t_p___tango___c32_8c.html#a5bfce6f9bf22ca10ae6da2e31f88977a">Static_PIN_INT</a>))</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span>    {</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span>        EXTI_Clear(<a class="code hl_define" href="_t_p___tango___c32_8c.html#aa28e2c51103617f389e931e72d7ad437">Static_GPIO_INT</a>, <a class="code hl_define" href="_t_p___tango___c32_8c.html#a5bfce6f9bf22ca10ae6da2e31f88977a">Static_PIN_INT</a>);</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span> </div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>        <span class="comment">//IRQ_Flag_TP = OK;</span></div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span>    }</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span>}</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span> </div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#a572b4cb1eb277e324904f37d7f16ce3f">  170</a></span>uint8_t <a class="code hl_function" href="_t_p___tango___c32_8c.html#a572b4cb1eb277e324904f37d7f16ce3f">tango_c32_read_points</a>(<a class="code hl_struct" href="structtp__data__t.html">tp_data_t</a> *p_data, uint8_t points)</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno">  171</span>{</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span>    uint8_t touch_status = 0, touch_points = 0, i = 0;</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span>    uint8_t buf[32] = {0};</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span> </div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span>    <a class="code hl_function" href="_t_p___tango___c32_8c.html#acee61865928b9e73b78e2704579503c8">tp_read_regs</a>(<a class="code hl_define" href="_t_p___tango___c32_8c.html#af014e1c397c2af62f6638e87ed0c348b">TANGO_RD_ADDR</a>, buf, 32); <span class="comment">/* 读取 X/Y 坐标值、触摸状态信息 */</span></div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span>    touch_status = buf[0];</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span>    <span class="comment">//uint8_t button = buf[1];</span></div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span>    </div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span>    touch_points = points;</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span>    <span class="comment">/* 期望读取的触摸点数已超过实际驱动中可读取的最大点数 */</span></div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span>    <span class="keywordflow">if</span> (touch_points &gt; touch_status)</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span>        touch_points = touch_status;</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span>    </div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span>    <span class="keywordflow">if</span> (touch_points == 0 || touch_points &gt; 5) <span class="comment">/* 无触摸点按下 */</span></div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span>    {</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span>        p_data[i].<a class="code hl_variable" href="structtp__data__t.html#a5202f2d226d6bf6ec85c52304098acd2">event</a> = <a class="code hl_enumvalue" href="dev__touch_8h.html#a9fffde3171a44771a6e9f8f0cbb52d71a693480a7cbe7d8d0a9d07a2d66ee9da2">TP_EVENT_RELEASED</a>;</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span>        <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span>    }</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span> </div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span>    <span class="keywordflow">for</span> (i = 0; i &lt; touch_points; ++i)</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span>    {</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span>        <span class="comment">//buf[6  11  16  21  26] /* 手指 ID */</span></div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span>        uint16_t temp_l = (((uint16_t)buf[3 + 5 * i] &lt;&lt; 8) | buf[2 + 5 * i]);</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span>        uint16_t temp_h = (((uint16_t)buf[5 + 5 * i] &lt;&lt; 8) | buf[4 + 5 * i]);</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno">  195</span>        <span class="comment">//printf(&quot;[temp_l] = [%d], [temp_h] = [%d]\r\n&quot;, temp_l, temp_h);</span></div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno">  196</span> </div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno">  197</span>        <span class="comment">/* 异常坐标值抛弃 */</span></div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span>        <span class="keywordflow">if</span> (temp_l == 0xFFFF || temp_h == 0xFFFF)</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span>        {</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno">  200</span>            <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno">  201</span>        }</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span>        <span class="comment">/* 坐标值有效, 视为按下 */</span></div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span>        p_data[i].<a class="code hl_variable" href="structtp__data__t.html#a5202f2d226d6bf6ec85c52304098acd2">event</a> = <a class="code hl_enumvalue" href="dev__touch_8h.html#a9fffde3171a44771a6e9f8f0cbb52d71a0b306b969e605870813a875062f36d2a">TP_EVENT_PRESSED</a>;</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span>        </div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span>        p_data[i].<a class="code hl_variable" href="structtp__data__t.html#a4dde988b1b2adba65ae3efa69f65d960">x</a> = <span class="comment">/*LCD_HDOT -*/</span> temp_l;</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span>        p_data[i].<a class="code hl_variable" href="structtp__data__t.html#ab0580f504a7428539be299fa71565f30">y</a> = <span class="comment">/*LCD_VDOT -*/</span> temp_h;</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span>    }</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span>    <span class="keywordflow">return</span> touch_points;</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno">  209</span>}</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno">  210</span> </div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno">  211</span><span class="comment">/*******************************************************************************************************************************************</span></div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno">  212</span><span class="comment"> * Private Function</span></div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span><span class="comment"> *******************************************************************************************************************************************/</span></div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#aefcde442eb24f10e7dc417f09097af2d">  217</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="_t_p___tango___c32_8c.html#aefcde442eb24f10e7dc417f09097af2d">iic_delay</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span>{</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span>    <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; CyclesPerUs * 8; ++i)</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span>        __NOP();</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno">  221</span>}</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno">  222</span> </div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"><a class="line" href="_t_p___tango___c32_8c.html#acee61865928b9e73b78e2704579503c8">  226</a></span><span class="keyword">static</span> uint8_t <a class="code hl_function" href="_t_p___tango___c32_8c.html#acee61865928b9e73b78e2704579503c8">tp_read_regs</a>(uint16_t reg, uint8_t *buf, uint8_t len)</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno">  227</span>{</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span>    uint8_t i;</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno">  229</span>    uint8_t ack;</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span> </div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno">  231</span>    ack = <a class="code hl_define" href="_t_p___tango___c32_8c.html#a0188bda80d65682f98cda88c71731c65">Static_IIC_Start</a>(<a class="code hl_define" href="_t_p___tango___c32_8c.html#a3d52c1b55b374a30d7fa78d704ca6045">TANGO_IIC_ADDR</a> | 0);</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno">  232</span>    <span class="keywordflow">if</span> (ack == 0)</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno">  233</span>        <span class="keywordflow">goto</span> rd_fail;</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno">  234</span> </div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno">  235</span>    ack = <a class="code hl_define" href="_t_p___tango___c32_8c.html#a17ac6d09f16373695a2e89f23d89e6b2">Static_IIC_Write</a>(reg &amp; 0XFF);</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno">  236</span>    <span class="keywordflow">if</span> (ack == 0)</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span>        <span class="keywordflow">goto</span> rd_fail;</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span> </div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span>    <a class="code hl_function" href="_t_p___tango___c32_8c.html#aefcde442eb24f10e7dc417f09097af2d">iic_delay</a>(); <span class="comment">/* 此处必须延时等待一会再启动 */</span></div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno">  240</span> </div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno">  241</span>    ack = <a class="code hl_define" href="_t_p___tango___c32_8c.html#a0188bda80d65682f98cda88c71731c65">Static_IIC_Start</a>(<a class="code hl_define" href="_t_p___tango___c32_8c.html#a3d52c1b55b374a30d7fa78d704ca6045">TANGO_IIC_ADDR</a> | 1); <span class="comment">/* ReStart */</span></div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno">  242</span>    <span class="keywordflow">if</span> (ack == 0)</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno">  243</span>        <span class="keywordflow">goto</span> rd_fail;</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno">  244</span> </div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno">  245</span>    <span class="keywordflow">for</span> (i = 0; i &lt; len - 1; i++)</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno">  246</span>    {</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno">  247</span>        buf[i] = <a class="code hl_define" href="_t_p___tango___c32_8c.html#a08854588549d953a2496307b86cb7742">Static_IIC_Read</a>(1);</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno">  248</span>    }</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno">  249</span>    buf[i] = <a class="code hl_define" href="_t_p___tango___c32_8c.html#a08854588549d953a2496307b86cb7742">Static_IIC_Read</a>(0);</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno">  250</span> </div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno">  251</span>    <a class="code hl_define" href="_t_p___tango___c32_8c.html#a4980d5242ba8a9b57c3a819410e1b296">Static_IIC_Stop</a>();</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno">  252</span>    <a class="code hl_function" href="_t_p___tango___c32_8c.html#aefcde442eb24f10e7dc417f09097af2d">iic_delay</a>();</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno">  253</span>    <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno">  254</span> </div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno">  255</span>rd_fail:</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno">  256</span>    <a class="code hl_define" href="_t_p___tango___c32_8c.html#a4980d5242ba8a9b57c3a819410e1b296">Static_IIC_Stop</a>();</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno">  257</span>    <a class="code hl_function" href="_t_p___tango___c32_8c.html#aefcde442eb24f10e7dc417f09097af2d">iic_delay</a>();</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno">  258</span>    <span class="keywordflow">return</span> 1;</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno">  259</span>}</div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a0188bda80d65682f98cda88c71731c65"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a0188bda80d65682f98cda88c71731c65">Static_IIC_Start</a></div><div class="ttdeci">#define Static_IIC_Start(addr)</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00061">TP_Tango_C32.c:61</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a07960df025fbd2b94adb95a629e2f897"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a07960df025fbd2b94adb95a629e2f897">tango_c32_init</a></div><div class="ttdeci">uint8_t tango_c32_init(void)</div><div class="ttdoc">初始化 TP_IC</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00127">TP_Tango_C32.c:127</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a08854588549d953a2496307b86cb7742"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a08854588549d953a2496307b86cb7742">Static_IIC_Read</a></div><div class="ttdeci">#define Static_IIC_Read(ack)</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00062">TP_Tango_C32.c:62</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a0e35163b9b8b2458d8ed860acccf2189"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a0e35163b9b8b2458d8ed860acccf2189">Static_PIN_RST</a></div><div class="ttdeci">#define Static_PIN_RST</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00037">TP_Tango_C32.c:37</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a1709a9c3e76518cfac5ae53c91ec08eb"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a1709a9c3e76518cfac5ae53c91ec08eb">Static_INT_Handler</a></div><div class="ttdeci">#define Static_INT_Handler</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00042">TP_Tango_C32.c:42</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a17ac6d09f16373695a2e89f23d89e6b2"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a17ac6d09f16373695a2e89f23d89e6b2">Static_IIC_Write</a></div><div class="ttdeci">#define Static_IIC_Write(data)</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00063">TP_Tango_C32.c:63</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a2542829d09bfc1ecd3d0d2eaea0ccc0c"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a2542829d09bfc1ecd3d0d2eaea0ccc0c">Static_INT_IRQn</a></div><div class="ttdeci">#define Static_INT_IRQn</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00041">TP_Tango_C32.c:41</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a3d52c1b55b374a30d7fa78d704ca6045"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a3d52c1b55b374a30d7fa78d704ca6045">TANGO_IIC_ADDR</a></div><div class="ttdeci">#define TANGO_IIC_ADDR</div><div class="ttdoc">按 8 位地址的方式定义(7 bit 器件地址 + 1 bit 读写控制位)</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00104">TP_Tango_C32.c:104</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a4980d5242ba8a9b57c3a819410e1b296"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a4980d5242ba8a9b57c3a819410e1b296">Static_IIC_Stop</a></div><div class="ttdeci">#define Static_IIC_Stop()</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00064">TP_Tango_C32.c:64</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a572b4cb1eb277e324904f37d7f16ce3f"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a572b4cb1eb277e324904f37d7f16ce3f">tango_c32_read_points</a></div><div class="ttdeci">uint8_t tango_c32_read_points(tp_data_t *p_data, uint8_t points)</div><div class="ttdoc">读取触摸点数据</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00170">TP_Tango_C32.c:170</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a5bfce6f9bf22ca10ae6da2e31f88977a"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a5bfce6f9bf22ca10ae6da2e31f88977a">Static_PIN_INT</a></div><div class="ttdeci">#define Static_PIN_INT</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00040">TP_Tango_C32.c:40</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a7b01f93f4dfe7b813806eb118d9a330a"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a7b01f93f4dfe7b813806eb118d9a330a">Static_Delay_MS</a></div><div class="ttdeci">#define Static_Delay_MS(ms)</div><div class="ttdoc">实现 ms 级延时</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00034">TP_Tango_C32.c:34</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a98f29e975049270f7294d868d575d478"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a98f29e975049270f7294d868d575d478">Static_IIC_Init</a></div><div class="ttdeci">#define Static_IIC_Init()</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00052">TP_Tango_C32.c:52</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a9a22cb6c038dd83c46f301f480b090ea"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a9a22cb6c038dd83c46f301f480b090ea">Static_GPIO_RST</a></div><div class="ttdeci">#define Static_GPIO_RST</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00036">TP_Tango_C32.c:36</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_aa28e2c51103617f389e931e72d7ad437"><div class="ttname"><a href="_t_p___tango___c32_8c.html#aa28e2c51103617f389e931e72d7ad437">Static_GPIO_INT</a></div><div class="ttdeci">#define Static_GPIO_INT</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00039">TP_Tango_C32.c:39</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_acee61865928b9e73b78e2704579503c8"><div class="ttname"><a href="_t_p___tango___c32_8c.html#acee61865928b9e73b78e2704579503c8">tp_read_regs</a></div><div class="ttdeci">static uint8_t tp_read_regs(uint16_t reg, uint8_t *buf, uint8_t len)</div><div class="ttdoc">读取从机寄存器</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00226">TP_Tango_C32.c:226</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_aefcde442eb24f10e7dc417f09097af2d"><div class="ttname"><a href="_t_p___tango___c32_8c.html#aefcde442eb24f10e7dc417f09097af2d">iic_delay</a></div><div class="ttdeci">static void iic_delay(void)</div><div class="ttdoc">iic 延时</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00217">TP_Tango_C32.c:217</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_af014e1c397c2af62f6638e87ed0c348b"><div class="ttname"><a href="_t_p___tango___c32_8c.html#af014e1c397c2af62f6638e87ed0c348b">TANGO_RD_ADDR</a></div><div class="ttdeci">#define TANGO_RD_ADDR</div><div class="ttdoc">触摸数据读取地址</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00107">TP_Tango_C32.c:107</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8h_html"><div class="ttname"><a href="_t_p___tango___c32_8h.html">TP_Tango_C32.h</a></div><div class="ttdoc">本例程为触摸 IC 驱动: Tango C32( &lt;PIXCIR&gt; 瀚瑞微)</div></div>
<div class="ttc" id="adev__io__i2c_8h_html"><div class="ttname"><a href="dev__io__i2c_8h.html">dev_io_i2c.h</a></div><div class="ttdoc">IO 模拟 IIC 通讯接口</div></div>
<div class="ttc" id="adev__systick_8h_html"><div class="ttname"><a href="dev__systick_8h.html">dev_systick.h</a></div><div class="ttdoc">系统滴答定时器</div></div>
<div class="ttc" id="adev__touch_8h_html_a9fffde3171a44771a6e9f8f0cbb52d71a0b306b969e605870813a875062f36d2a"><div class="ttname"><a href="dev__touch_8h.html#a9fffde3171a44771a6e9f8f0cbb52d71a0b306b969e605870813a875062f36d2a">TP_EVENT_PRESSED</a></div><div class="ttdeci">@ TP_EVENT_PRESSED</div><div class="ttdoc">触屏按下</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00123">dev_touch.h:122</a></div></div>
<div class="ttc" id="adev__touch_8h_html_a9fffde3171a44771a6e9f8f0cbb52d71a693480a7cbe7d8d0a9d07a2d66ee9da2"><div class="ttname"><a href="dev__touch_8h.html#a9fffde3171a44771a6e9f8f0cbb52d71a693480a7cbe7d8d0a9d07a2d66ee9da2">TP_EVENT_RELEASED</a></div><div class="ttdeci">@ TP_EVENT_RELEASED</div><div class="ttdoc">触屏释放</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00121">dev_touch.h:121</a></div></div>
<div class="ttc" id="astructtp__data__t_html"><div class="ttname"><a href="structtp__data__t.html">tp_data_t</a></div><div class="ttdoc">触摸数据结构体</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00126">dev_touch.h:127</a></div></div>
<div class="ttc" id="astructtp__data__t_html_a4dde988b1b2adba65ae3efa69f65d960"><div class="ttname"><a href="structtp__data__t.html#a4dde988b1b2adba65ae3efa69f65d960">tp_data_t::x</a></div><div class="ttdeci">uint16_t x</div><div class="ttdoc">触摸点 X 轴坐标</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00128">dev_touch.h:128</a></div></div>
<div class="ttc" id="astructtp__data__t_html_a5202f2d226d6bf6ec85c52304098acd2"><div class="ttname"><a href="structtp__data__t.html#a5202f2d226d6bf6ec85c52304098acd2">tp_data_t::event</a></div><div class="ttdeci">tp_event_t event</div><div class="ttdoc">触摸事件(抬起/按下/移动等等)</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00130">dev_touch.h:130</a></div></div>
<div class="ttc" id="astructtp__data__t_html_ab0580f504a7428539be299fa71565f30"><div class="ttname"><a href="structtp__data__t.html#ab0580f504a7428539be299fa71565f30">tp_data_t::y</a></div><div class="ttdeci">uint16_t y</div><div class="ttdoc">触摸点 Y 轴坐标</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00129">dev_touch.h:129</a></div></div>
<div class="ttc" id="aversion_8h_html"><div class="ttname"><a href="version_8h.html">version.h</a></div><div class="ttdoc">版本/目标控制</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
